package com.jtcoding.chat.exception;

import com.jtcoding.chat.common.enums.ResultCode;

import javax.crypto.MacSpi;

/**
 * @author jason.tang
 * @create 2019-01-02 15:03
 * @description
 */
public class ApiException extends RuntimeException {

    private ResultCode resultCode;

    public ApiException(ResultCode resultCode) {
        super(resultCode.msg());
        this.resultCode = resultCode;
    }

    public ApiException(String message) {
        super(message);
    }

    public ApiException(Throwable cause) {
        super(cause);
    }

    public ApiException(String message, Throwable cause) {
        super(message, cause);
    }

    public ResultCode getResultCode() {
        return this.resultCode;
    }
}